home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / mac / files / t_sys5 / 92052tar.gz / 920528.tar / mail.h < prev    next >
C/C++ Source or Header  |  1991-06-04  |  1KB  |  58 lines

  1. /* @(#) $Header: mail.h,v 1.10 91/06/04 11:34:19 deyke Exp $ */
  2.  
  3. #ifndef _MAIL_H
  4. #define _MAIL_H
  5.  
  6. #include "global.h"
  7.  
  8. #define CONFFILE   "/tcp/mail.conf"
  9. #define SPOOLDIR   "/usr/spool/uucp"
  10. #define RETRYTIME  (60L*60)
  11. #define RETURNTIME (60L*60*24*3)
  12. #define MAXJOBS    10
  13.  
  14. struct mailers;
  15.  
  16. struct mailsys {
  17.   char  *sysname;
  18.   struct mailers *mailer;
  19.   char  *protocol, *address;
  20.   int  state;
  21. #define MS_NEVER        0       /* Inactive states */
  22. #define MS_SUCCESS      1
  23. #define MS_FAILURE      2
  24. #define MS_TRYING       3       /* Active states */
  25. #define MS_TALKING      4
  26.   long  nexttime;
  27.   struct mailjob *jobs;
  28.   struct mailsys *next;
  29. };
  30.  
  31. struct mailers {
  32.   char  *name;
  33.   void (*func) __ARGS((struct mailsys *sp));
  34. };
  35.  
  36. struct mailjob {
  37.   char  to[1024], from[1024], subject[1024];
  38.   char  dfile[80], cfile[80], xfile[80];
  39.   char  return_reason[1024];
  40.   struct mailjob *next;
  41. };
  42.  
  43. /* In mail_bbs.c: */
  44. void mail_bbs __ARGS((struct mailsys *sp));
  45.  
  46. /* In mail_retrn.c: */
  47. void mail_return __ARGS((struct mailjob *jp));
  48.  
  49. /* In mail_smtp.c: */
  50. void mail_smtp __ARGS((struct mailsys *sp));
  51.  
  52. /* In mail_subr.c: */
  53. char *get_user_from_path __ARGS((char *path));
  54. char *get_host_from_path __ARGS((char *path));
  55. void mailer_failed __ARGS((struct mailsys *sp));
  56.  
  57. #endif  /* _MAIL_H */
  58.